package com.zyong.design.pattern.state.case4;

import java.util.List;

/**
 * @program: zyong-design-pattern
 * @ClassName: Client
 * @author: zyong
 * @create: 2024-03-25 00:40
 */
public class Client {
    public static void main(String[] args) {
        StateContext stateContext = new StateContext();
        State state = new Start();

        do {
            state.doProcess(stateContext);

            state = state.nextState(stateContext);
        } while (state != null);

        System.out.println("===============all process===================");

        List<String> processList = stateContext.getProcessList();
        for (String process : processList) {
            System.out.println(process);
        }
    }
}
